package com.zhonghui.modlules.cart.param;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class CartParam {

    @Min(value = 1,message = "数量不在合法范围内")
    @Max(value = 9999,message = "数量不在合法范围内")
    private Integer cartNum;

    @JsonProperty(value = "new")
    private Integer isNew = 0;

    @NotNull(message = "参数有误")
    private Long productId;

    private String uniqueId;

    private Long combinationId = 0L;

    private Long secKillId = 0L;

    private Long bargainId = 0L;
}
